<!DOCTYPE html>
<html>
<head>
	<title>dog</title>
	<meta charset="utf-8">
	<style type="text/css">
	/*	body{
			position: relative;
		}*/
		#s{
			height: 50px;
			width: 50px;
			background-color: #999;
			position: absolute;
			transition:left 2S,top 2S;
		}
		html,body{
			height: 100%;
			width: 100%;
		}
	</style>
</head>
<body id="b">
	<div > </div>
	<img src="../image/timg.jpg" id="s">
<script type="text/javascript">
	var s = document.getElementById('s')
	var b = document.getElementById('b')
		b.onmousemove=function(){
			s.style.left=event.x+"px"
			s.style.top=event.y+"px"
		}
</script>
</body>
</html>